﻿@model CodeStash.Models.Snippet.CodeSnippetWrapperViewModel
@using CodeStash.Models.Snippet
@using CodeStash.ExtensionsMethods
@using CodeStash.Utils
@using System.Linq

<div id="forum.@Model.CodeSnippet.CodeSnippetId" class="forumMessage">
    <div class="forumHeader">
        <a href="#">Add comment</a>
    </div>
    @foreach (CodeStash.Common.DataAccess.EntityFramework.CodeSnippetForumMessage message in Model.CodeSnippet.CodeSnippetForumMessages.Distinct().OrderByDescending(x => x.Created))
    {
        // Write out an individual form message.
        <div class="HeaderMessage">@message.Created.ToShortDateString()</div>
        <div class="HeaderMessage">@message.MessageText</div>
    }
</div>